data_root="/mnt/nas/shengjie/datasets/DressCode_1024"
clo_types=("dresses" "upper" "lower")
sub_dirs=("cloth" "cloth_align_mask-bytedance" "cloth_mask" "densepose" "parse-bytedance" "cloth_align" "cloth_align_parse-bytedance" "cloth_parse" "image" "pose_25")

for clo_type in "${clo_types[@]}"; do
    main_dir="${data_root}/${clo_type}"
    for sub_dir in "${sub_dirs[@]}"; do
        full_sub_dir="${main_dir}/${sub_dir}"
        if [ -d "$full_sub_dir" ]; then
            echo "Processing $full_sub_dir"
            bash restore.sh "$full_sub_dir"
        else
            echo "Directory $full_sub_dir does not exist, skipping."
        fi
    done
done
